{% load i18n %}

<h2>{% trans 'Data' %}</h2>

<form action="{% url lfs_manage_category_edit_data category.id %}"
      method="post">
    {% csrf_token %}
    <fieldset>
        <legend>{% trans "General" %}</legend>
        <div class="field">
            <div class="label">
                {{ form.exclude_from_navigation.label_tag }}:
            </div>
            <div>
                {{ form.exclude_from_navigation }}
            </div>
        </div>
        <div class="field">
            <div class="label">
                {{ form.name.label_tag }}:
            </div>
            {% if form.name.errors %}
                <div class="error">
                    {{ form.name }}
                    {{ form.name.errors }}
                </div>
            {% else %}
                <div>
                    {{ form.name }}
                </div>
            {% endif %}
        </div>
        <div class="field">
            <div class="label">
                {{ form.slug.label_tag }}:
            </div>
            {% if form.slug.errors %}
                <div class="error">
                    {{ form.slug }}
                    {{ form.slug.errors }}
                </div>
            {% else %}
                <div>
                    {{ form.slug }}
                </div>
            {% endif %}
        </div>
    </fieldset>
    <div class="field">
        <div class="label">
            {{ form.short_description.label_tag }}:
        </div>
        {% if form.short_description.errors %}
            <div class="error">
                {{ form.short_description }}
                {{ form.short_description.errors }}
            </div>
        {% else %}
            <div>
                {{ form.short_description }}
            </div>
        {% endif %}
    </div>
    <div class="field">
        <div class="label">
            {{ form.description.label_tag }}:
        </div>
        {% if form.description.errors %}
            <div class="error">
                {{ form.description }}
                {{ form.description.errors }}
            </div>
        {% else %}
            <div>
                {{ form.description }}
            </div>
        {% endif %}
    </div>
    <fieldset>
        <legend>{% trans "Appearance" %}</legend>
            <div class="field">
                <div class="label">
                    {% trans "Image" %}
                </div>
                {% if form.image.errors %}
                    <div class="error">
                        {{ form.image }}
                        {{ form.image.errors }}
                    </div>
                {% else %}
                    <div>
                        {{ form.image }}
                    </div>
                {% endif %}
            </div>
            <div class="field">
                <div class="label">
                    {{ form.static_block.label_tag }}:
                </div>
                {% if form.static_block.errors %}
                    <div class="error">
                        {{ form.static_block }}
                        {{ form.static_block.errors }}
                    </div>
                {% else %}
                    <div>
                        {{ form.static_block }}
                    </div>
                {% endif %}
            </div>
    </fieldset>

    <div class="buttons">
        <input value="{% trans 'Save data' %}"
               type="submit"
               class="ajax-save-button button"/>
    </div>
</form>
